package cn.wzut.edut.exception;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 业务异常处理类
 * by 叶庭辉
 *
 *
 * 使用示例：
 * //业务中需要的位置抛出Exception
 * throw new GuliException(状态码,"错误信息");
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceException extends RuntimeException {

    @ApiModelProperty(value = "状态码")
    private Integer code = -1;
    @ApiModelProperty(value = "错误描述")
    private String msg = "服务异常，请稍后重试";

}
